<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script>
    function Persion (name,age) {
        this.name = name ;
        this.age = age ;
    }
    Persion.prototype.show=function(){
            document.write("我是"+this.name+",年龄"+this.age+"<br>");
        }
    var xiaoming = new Persion('小明','13')
    var sun = new Persion("张三",30);
	sun.show();
    xiaoming.show()
    var xiaohong = new Object();
    xiaohong.name = "小红";
    xiaohong.age = 12;
    xiaohong.show = function () {
        document.write("我是"+xiaohong.name+",年龄"+xiaohong.age+"<br>")
    }
    xiaohong.show()
    
</script>